{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pickle\n",
    "catLookup = {'human_bike': 'Homo erectus', #not in original\n",
    "             'human_ohv': 'car', #not in original\n",
    "             'spotted_skunk': 'Spilogale gracilis', #nio\n",
    "             'gray_squirrel': 'Sciurus griseus',\n",
    "             'DIVI_opossum': 'Didelphis virginiana',\n",
    "             'ROSP_ratlike': 'Muridae', #family\n",
    "             'mouse_or_rat': 'Muridae', #family\n",
    "             'rat': 'Rattus rattus',\n",
    "             'Rat': 'Rattus rattus',\n",
    "             'SUSC_pig': 'Sus scrofa',\n",
    "             'grayfox': 'Urocyon cinereoargenteus',\n",
    "             'california_towhee': 'Melozone crissalis',\n",
    "             'northern_flicker': 'Colaptes auratus',\n",
    "             'scrub_jay': 'Aphelocoma californica',\n",
    "             'mule_deer': 'Odocoileus hemionus californicus',\n",
    "             'thrasher': 'Mimidae', #family\n",
    "             'whiptail': 'Aspidoscelis', #genus\n",
    "             'fence_lizard': 'Sceloporus occidentalis',\n",
    "             'wren': 'Troglodytidae', #family\n",
    "             'woodrat': 'Neotoma fuscipes', #?\n",
    "             'WoodRat': 'Neotoma fuscipes', #?\n",
    "             'raven': 'Corvus corax',\n",
    "             'crow': 'Corvus brachyrhynchos',\n",
    "             'hawk': 'Accipitridae', #subfamily\n",
    "             'road runner': 'Geococcyx californianus',\n",
    "             'burrowing_owl': 'Athene cunicularia',\n",
    "             'kangaroo_rat': 'Dipodomys merriami', #nio\n",
    "             'quail': 'Coturnix coturnix', #nio  Is it a california quail?\n",
    "             'mourning_dove': 'Zenaida macroura',\n",
    "             'spotted_towhee': 'Pipilo maculatus',\n",
    "             'sparrow': 'Zonotrichia', #genus\n",
    "             'hummingbird': 'Calypte', #genus\n",
    "             'white_crowned_sparrow': 'Zonotrichia leucophrys',\n",
    "             'california_thrasher': 'Toxostoma redivivum',\n",
    "             'black-hooded_parakeet': 'Aratinga nenday',\n",
    "             'western_meadowlark': 'Sturnella neglecta',\n",
    "             'bluejay': 'Cyanocitta cristata',\n",
    "             'jay': 'Corvidae', #family\n",
    "             'rock_sparrow': 'Petronia petronia', #nio\n",
    "             'fox_sparrow': 'Passerella iliaca',\n",
    "             'california_mouse': 'Peromyscus californicus', #nio\n",
    "             'oak_titmouse': 'Baeolophus inornatus',\n",
    "             'dove': 'Zenaida macroura', #macro?\n",
    "             'owl': 'Strigiformes', #order\n",
    "             'northern_mockingbird': 'Mimus polyglottos',\n",
    "             'coyote_pup': 'Canis latrans',\n",
    "             'sage_thrasher': 'Oreoscoptes montanus',\n",
    "             'common_poorwill': 'Phalaenoptilus nuttallii',\n",
    "             'acorn_woodpecker': 'Melanerpes formicivorus',\n",
    "             'flicker': 'Colaptes', #genus\n",
    "             'rock_wren': 'Salpinctes obsoletus',\n",
    "             'california_quail': 'Callipepla californica',\n",
    "             'american_goldfinch': 'Spinus tristis',\n",
    "             'thrush': 'Turdus', #genus\n",
    "             'finch': 'Spinus', #genus\n",
    "             'field_mouse': 'Microtus pennsylvanicus',\n",
    "             'house_finch': 'Haemorhous mexicanus',\n",
    "             'red_fox': 'Vulpes vulpes fulvus',\n",
    "             'meadowlark': 'Sturnella neglecta', \n",
    "             'chicken': 'Gallus gallus domesticus',\n",
    "             'black-headed_grossbeak': 'Pheucticus melanocephalus',\n",
    "             'great_egret': 'Ardea alba',\n",
    "             'barn_owl': 'Tyto alba',\n",
    "             'kit_fox': 'Vulpes macrotis', #nio\n",
    "             'burro': 'Equus asinus',\n",
    "             'antelope_squirrel': 'Ammospermophilus', #genus\n",
    "             'northern_harrier': 'Circus cyaneus hudsonius',\n",
    "             'red-tailed_hawk': 'Buteo jamaicensis',\n",
    "             'cowbird': 'Molothrus', #genus\n",
    "             'great_blue_heron': 'Ardea herodias',\n",
    "             'golden_eagle': 'Aquila chrysaetos',\n",
    "             'chukar': 'Alectoris chukar',\n",
    "             'cliff_chipmunk': 'Tamias dorsalis',\n",
    "             'clarks_nutcracker': 'Nucifraga columbiana',\n",
    "             'woodpecker': 'Picidae', #family\n",
    "             'horned_owl': 'Bubo', #genus\n",
    "             'belted_kingfisher': 'Megaceryle alcyon',\n",
    "             'robin': 'Turdus migratorius', #?\n",
    "             'coot': 'Fulica americana',\n",
    "             'pinyon_jay': 'Gymnorhinus cyanocephalus', #nio\n",
    "             'coopers_hawk': 'Accipiter cooperii',\n",
    "             'turkey_vulture': 'Cathartes aura',\n",
    "             'cottontail': 'Sylvilagus audubonii', #?\n",
    "             'small mammal': 'Rodentia', #order\n",
    "             'human': 'Homo erectus',\n",
    "             'bobcat': 'Lynx rufus',\n",
    "             'badger': 'Mustelidae', #family\n",
    "             'opossum': 'Didelphis', #genus\n",
    "             'bird': 'Aves', #class\n",
    "             'squirrel': 'Sciuridae',#family\n",
    "             'rabbit': 'Leporidae', #family\n",
    "             'coyote': 'Canis latrans',\n",
    "             'skunk': 'Mephitidae', #family\n",
    "             'dog': 'Canis familiaris',\n",
    "             'cat': 'Felis catus',\n",
    "             'lizard': 'Lacertilia', #suborder\n",
    "             'raccoon': 'Procyon lotor',\n",
    "             'horse': 'Equus caballus',\n",
    "             'deer': 'Cervidae', #family\n",
    "             'human_horse': 'Equus caballus', #I guess?\n",
    "             'cow': 'Bos taurus',\n",
    "             'pig': 'Sus scrofa',\n",
    "             'mountain_lion': 'Puma concolor',\n",
    "             'fox': 'Vulpes', #genus\n",
    "             'bat': 'Chiroptera', #order\n",
    "             'moth': 'Lepidoptera', #order\n",
    "             'mouse': 'Mus', #genus\n",
    "             'butterfly': 'Lepidoptera', #order\n",
    "             'jackrabbit': 'Lepus', #genus\n",
    "             'antelope': 'Antilocapra americana',\n",
    "             'rock_squirrel': 'Otospermophilus variegatus',\n",
    "             'ringtail': 'Bassariscus astutus',\n",
    "             'bighorn_sheep': 'Ovis canadensis',\n",
    "             'elk': 'Cervus canadensis',\n",
    "             'krat': 'Dipodomys merriami',\n",
    "             'herp': 'Lacertilia', #suborder\n",
    "             'fox_squirrel': 'Sciurus niger',\n",
    "             'striped_skunk': 'Mephitis mephitis',\n",
    "             'hermit_thrush': 'Catharus guttatus',\n",
    "             'desert_cottontail': 'Sylvilagus audubonii',\n",
    "             'brush_rabbit': 'Sylvilagus bachmani',\n",
    "             'rodent': 'Muridae', #family,\n",
    "             'black_bear': 'Ursus americanus',\n",
    "             'dark-eyed_junco': 'Junco hyemalis',\n",
    "             'black_phoebe': 'Sayornis nigricans',\n",
    "             'white-crowned_sparrow': 'Zonotrichia leucophrys',\n",
    "             'western_scrub_jay': 'Aphelocoma californica', #maybe Aphelocoma genus?\n",
    "             'ground_dove': 'Columbina', #genus\n",
    "             'yellow-rumped_warbler': 'Setophaga coronata',\n",
    "             'american_robin': 'Turdus migratorius',\n",
    "             'deer_mouse': 'Peromyscus maniculatus',\n",
    "             'gnatcatcher': 'Polioptilidae'#family\n",
    "             }\n",
    "pickle.dump(catLookup, open('inat_category_lookup.p','wb'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
